using System;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using System.ComponentModel.Design;
using AjaxControlToolkit;

[assembly: System.Web.UI.WebResource("MaxLengthTextbox.MaxLengthTextboxBehavior.js", "text/javascript")]

namespace MaxLengthTextbox
{
    [Designer(typeof(MaxLengthTextboxDesigner))]
    [ClientScriptResource("MaxLengthTextbox.MaxLengthTextboxBehavior", "MaxLengthTextbox.MaxLengthTextboxBehavior.js")]
    [TargetControlType(typeof(TextBox))]
    public class MaxLengthTextboxExtender : ExtenderControlBase
    {
        [ExtenderControlProperty]
        [DefaultValue("0")]
        public int MaxLength
        {
            get
            {
                return GetPropertyValue("MaxLength", 0);
            }
            set
            {
                SetPropertyValue("MaxLength", value);
            }
        }
    }
}
